ZFS软件包默认收录在contrib repository仓库。backports repository仓库提供最新版本的ZFS软件包。
一、添加backports仓库
sudo nano /etc/apt/sources.list.d/buster-backports.list
添加以下代码:
deb http://deb.debian.org/debian buster-backports main contrib deb-src http://deb.debian.org/debian buster-backports main contrib
二、编辑/etc/apt/preferences.d/90_zfs文件
sudo nano /etc/apt/preferences.d/90_zfs
加入以下内容:
Package: libnvpair1linux libuutil1linux libzfs2linux libzpool2linux spl-dkms zfs-dkms zfs-test zfsutils-linux zfsutils-linux-dev zfs-zed Pin: release n=buster-backports Pin-Priority: 990
按Ctrl+S保存,Ctrl+X退出
三、安装ZFS相关软件包
sudo apt-get update sudo apt-get install dpkg-dev linux-headers-$(uname -r) linux-image-amd64 sudo apt-get install zfs-dkms zfsutils-linux